package io.github.bloquesoft.entity.storage.analysis;

import io.github.bloquesoft.entity.definition.EntityDefinition;
import io.github.bloquesoft.entity.value.EntityValue;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

public class EntityAnalysisResult {

    @Getter
    private final EntityDefinition targetRoot;

    @Getter
    List<EntityValue> insertList = new ArrayList<>();

    @Getter
    List<EntityValue> updateList = new ArrayList<>();

    @Getter
    List<EntityValue> deleteList = new ArrayList<>();

    public EntityAnalysisResult(EntityDefinition targetRoot) {
        this.targetRoot = targetRoot;
    }

    public void addInsert(EntityValue entityValue) {
        insertList.add(entityValue);
    }

    public void addUpdate(EntityValue entityValue){
        updateList.add(entityValue);
    }

    public void addDelete(EntityValue entityValue){
        deleteList.add(entityValue);
    }
}